package com.xuecheng.order.service;

import com.xuecheng.commons.model.dto.PageRequest;
import com.xuecheng.commons.model.vo.OrdersVo;
import com.xuecheng.commons.model.vo.PersonOrdersVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.order.domain.Orders;
import com.baomidou.mybatisplus.extension.service.IService;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-12-13
 */
public interface OrdersService extends IService<Orders> {

    //创建订单
    ResponseResult<String> createOrder(Long coursePubId);
    //支付结果返回
    ResponseResult<OrdersVo> isPay(String orderNo);

    // 每间隔30秒，查询未支付订单，清理
    void clearOrder();
    //用户课程订单列表
    ResponseResult<PersonOrdersVo> findOrdersByPage(PageRequest pageRequest);
}
